﻿using System;
using Confluent.Kafka;

namespace NetMicro.EventBus.Kafka
{
    public interface IKafkaConnection : IDisposable
    {
        IProducer<string, byte[]> RentProducer();

        bool Return(IProducer<string, byte[]> producer);

       

        /// <summary>
        /// 创建消息消费者
        /// </summary>
        /// <param name="groupId"></param>
        /// <returns></returns>
        IConsumer<string, byte[]> CreateConsumer(string eventHandlerName);
    }
}